#include "FITKCDDataSolid.h"

using namespace Interface;

void FITKCDDataSolid::setSolid_Type(int nVal)
{
	setValue("Solid_Type", nVal);
}
void FITKCDDataSolid::setMaterial(int nVal)
{
	setValue("Material", nVal);
}
void FITKCDDataSolid::setDensity(int nVal)
{
	setValue("Density", nVal);
}
void FITKCDDataSolid::setRigid_Type(int nVal)
{
	setValue("Rigid_Type", nVal);
}
void FITKCDDataSolid::setMass(double dVal)
{
	setValue("Mass", dVal);
}
void FITKCDDataSolid::setCustom_Defined_Inertia_Matrix(bool bVal)
{
	setValue("Custom_Defined_Inertia_Matrix", bVal);
}
void FITKCDDataSolid::setCentroid(double* dVal)
{
	setValue("Centroid_0", dVal[0]);
	setValue("Centroid_1", dVal[1]);
	setValue("Centroid_2", dVal[2]);
}
void FITKCDDataSolid::setInertia_Matrix_xx(double dVal)
{
	setValue("Inertia_Matrix_xx", dVal);
}
void FITKCDDataSolid::setInertia_Matrix_yy(double dVal)
{
	setValue("Inertia_Matrix_yy", dVal);
}
void FITKCDDataSolid::setInertia_Matrix_zz(double dVal)
{
	setValue("Inertia_Matrix_zz", dVal);
}
void FITKCDDataSolid::setInertia_Matrix_xy(double dVal)
{
	setValue("Inertia_Matrix_xy", dVal);
}
void FITKCDDataSolid::setInertia_Matrix_xz(double dVal)
{
	setValue("Inertia_Matrix_xz", dVal);
}
void FITKCDDataSolid::setInertia_Matrix_yz(double dVal)
{
	setValue("Inertia_Matrix_yz", dVal);
}
void FITKCDDataSolid::setLinear_Velocity(double* dVal)
{
	setValue("Linear_Velocity_0", dVal[0]);
	setValue("Linear_Velocity_1", dVal[1]);
	setValue("Linear_Velocity_2", dVal[2]);
}
void FITKCDDataSolid::setAngular_Velocity(double* dVal)
{
	setValue("Angular_Velocity_0", dVal[0]);
	setValue("Angular_Velocity_1", dVal[1]);
	setValue("Angular_Velocity_2", dVal[2]);
}
void FITKCDDataSolid::setInitial_Euler_Angles(double* dVal)
{
	setValue("Initial_Euler_Angles_0", dVal[0]);
	setValue("Initial_Euler_Angles_1", dVal[1]);
	setValue("Initial_Euler_Angles_2", dVal[2]);
}

void FITKCDDataSolid::setType_of_Element(int nVal)
{
	setValue("Type_of_Element", nVal);
}
void FITKCDDataSolid::setIn_or_Out_Normalvector(int nVal)
{
	setValue("In_or_Out_Normalvector", nVal);
}
void FITKCDDataSolid::setSpecified_Axis(double* dVal)
{
	setValue("Specified_Axis_0", dVal[0]);
	setValue("Specified_Axis_1", dVal[1]);
	setValue("Specified_Axis_2", dVal[2]);
}
void FITKCDDataSolid::setConstrain_DOF(bool bVal)
{
	setValue("Constrain_DOF", bVal);
}
void FITKCDDataSolid::setFreeze_Movement_X(bool bVal)
{
	setValue("Freeze_Movement_X", bVal);
}
void FITKCDDataSolid::setFreeze_Movement_Y(bool bVal)
{
	setValue("Freeze_Movement_Y", bVal);
}
void FITKCDDataSolid::setFreeze_Movement_Z(bool bVal)
{
	setValue("Freeze_Movement_Z", bVal);
}
void FITKCDDataSolid::setFreeze_Rotation_X(bool bVal)
{
	setValue("Freeze_Rotation_X", bVal);
}
void FITKCDDataSolid::setFreeze_Rotation_Y(bool bVal)
{
	setValue("Freeze_Rotation_Y", bVal);
}
void FITKCDDataSolid::setFreeze_Rotation_Z(bool bVal)
{
	setValue("Freeze_Rotation_Z", bVal);
}



int FITKCDDataSolid::getSolid_Type()
{
	return getValue("Solid_Type").toInt();
}
int FITKCDDataSolid::getMaterial()
{
	return getValue("Material").toInt();
}
int FITKCDDataSolid::getDensity()
{
	return getValue("Density").toInt();
}
int FITKCDDataSolid::getRigid_Type()
{
	return getValue("Rigid_Type").toInt();
}
double FITKCDDataSolid::getMass()
{
	return getValue("Mass").toDouble();
}
bool FITKCDDataSolid::getCustom_Defined_Inertia_Matrix()
{
	return getValue("Custom_Defined_Inertia_Matrix").toBool();
}
double* FITKCDDataSolid::getCentroid()
{
	double* Centroid = new double[3];
	Centroid[0] = getValue("Centroid_0").toDouble();
	Centroid[1] = getValue("Centroid_1").toDouble();
	Centroid[2] = getValue("Centroid_2").toDouble();
	return Centroid;
}
double FITKCDDataSolid::getInertia_Matrix_xx()
{
	return getValue("Inertia_Matrix_xx").toDouble();
}
double FITKCDDataSolid::getInertia_Matrix_yy()
{
	return getValue("Inertia_Matrix_yy").toDouble();
}
double FITKCDDataSolid::getInertia_Matrix_zz()
{
	return getValue("Inertia_Matrix_zz").toDouble();
}
double FITKCDDataSolid::getInertia_Matrix_xy()
{
	return getValue("Inertia_Matrix_xy").toDouble();
}
double FITKCDDataSolid::getInertia_Matrix_xz()
{
	return getValue("Inertia_Matrix_xz").toDouble();
}
double FITKCDDataSolid::getInertia_Matrix_yz()
{
	return getValue("Inertia_Matrix_yz").toDouble();
}
double* FITKCDDataSolid::getLinear_Velocity()
{
	double* Linear_Velocity = new double[3];
	Linear_Velocity[0] = getValue("Linear_Velocity_0").toDouble();
	Linear_Velocity[1] = getValue("Linear_Velocity_1").toDouble();
	Linear_Velocity[2] = getValue("Linear_Velocity_2").toDouble();
	return Linear_Velocity;
}
double* FITKCDDataSolid::getAngular_Velocity()
{
	double* Angular_Velocity = new double[3];
	Angular_Velocity[0] = getValue("Angular_Velocity_0").toDouble();
	Angular_Velocity[1] = getValue("Angular_Velocity_1").toDouble();
	Angular_Velocity[2] = getValue("Angular_Velocity_2").toDouble();
	return Angular_Velocity;
}
double* FITKCDDataSolid::getInitial_Euler_Angles()
{
	double* Initial_Euler_Angles = new double[3];
	Initial_Euler_Angles[0] = getValue("Initial_Euler_Angles_0").toDouble();
	Initial_Euler_Angles[1] = getValue("Initial_Euler_Angles_1").toDouble();
	Initial_Euler_Angles[2] = getValue("Initial_Euler_Angles_2").toDouble();
	return Initial_Euler_Angles;
}

int FITKCDDataSolid::getType_of_Element()
{
	return getValue("Type_of_Element").toInt();
}
int FITKCDDataSolid::getIn_or_Out_Normalvector()
{
	return getValue("In_or_Out_Normalvector").toInt();
}
double* FITKCDDataSolid::getSpecified_Axis()
{
	double* Specified_Axis = new double[3];
	Specified_Axis[0] = getValue("Specified_Axis_0").toDouble();
	Specified_Axis[1] = getValue("Specified_Axis_1").toDouble();
	Specified_Axis[2] = getValue("Specified_Axis_2").toDouble();
	return Specified_Axis;
}
bool FITKCDDataSolid::getConstrain_DOF()
{
	return getValue("Constrain_DOF").toBool();
}
bool FITKCDDataSolid::getFreeze_Movement_X()
{
	return getValue("Freeze_Movement_X").toBool();
}
bool FITKCDDataSolid::getFreeze_Movement_Y()
{
	return getValue("Freeze_Movement_Y").toBool();
}
bool FITKCDDataSolid::getFreeze_Movement_Z()
{
	return getValue("Freeze_Movement_Z").toBool();
}
bool FITKCDDataSolid::getFreeze_Rotation_X()
{
	return getValue("Freeze_Rotation_X").toBool();
}
bool FITKCDDataSolid::getFreeze_Rotation_Y()
{
	return getValue("Freeze_Rotation_Y").toBool();
}
bool FITKCDDataSolid::getFreeze_Rotation_Z()
{
	return getValue("Freeze_Rotation_Z").toBool();
}
